var t = require("../../../api.js"), a = getApp();

require("../../../utils/function.js");

Page({
    data: {
        list: [],
        page: 1
    },
    onLoad: function(t) {
        this.getRecord();
    },
    onReady: function() {},
    onShow: function() {},
    getRecord: function() {
        var n = this;
        a.request({
            url: t.user.inoviceRecord,
            method: "post",
            data: {
                page: n.data.page
            },
            success: function(t) {
                if (0 == t.data.data.length) return wx.showToast({
                    title: "没有更多数据了",
                    icon: "none"
                }), !1;
                var a = n.data.list.concat(t.data.data);
                n.setData({
                    list: a,
                    total: t.data.total
                });
            }
        });
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {
        var t = this.data.page + 1, a = this;
        this.setData({
            page: t
        }, function() {
            a.getRecord();
        });
    },
    onShareAppMessage: function() {}
});